#include<iostream>
#include<conio.h>
using namespace std;
int main() {
    int a;
    int b;
    int count=0;
    int kq;
    int temp;
    int X=0;
    int Y=0;
        while(X<100 || X>9999999 )
       {
        cout<<"nhap x:";
        cin>>X;
       }       
        while( Y>9999999 || X >Y )
        {
        cout<<"nhap y: ";
        cin>>Y;
    }        
        kq=X;
        while (kq<Y) 
       {
	        kq=kq+1;
	        temp=kq; 
	        bool f = true;
	        while(temp>0)
	        {
		        a=temp/10%10;
		        b=temp%10;
				
		        if(a<b)
		        	temp=temp/10; 
		        else{
		        	f = false;
		        	break;
		        }
			}
			if(f){
				count=count+1;  
				cout<< kq << endl;
			}	
		}
        cout<<"\ncount: ";        
        cout<<count;
}
